home *** CD-ROM | disk | FTP | other *** search
/ Mission to McDonaldLand / Mission To McDonaldLand.iso / code.cst / 00041_Script_FLY < prev    next >
Text File  |  1998-10-29  |  4KB  |  120 lines

  1. on enterFrame
  2.   global heading
  3.   global move
  4.   global updown
  5.   global silly
  6.   global nomore
  7.   global restoration
  8.   global castrestore
  9.   global CStop
  10.   
  11.   if CStop = 1 then 
  12.     if the mouseH < the locH of sprite 30 then set the member of sprite 30 = "Left"
  13.     if the mouseH > the locH of sprite 30 then set the member of sprite 30 = "Right"
  14.     abort
  15.   end if
  16.   
  17.   if silly = 1 then
  18.     if the locH of sprite 30 < 100 or the locH of sprite 30 > 550 then
  19.       set silly = 0
  20.       puppetSound "off"
  21.       set the member of sprite 30 = "Right"
  22.     end if
  23.     
  24.     if the mouseH < the locH of sprite 30 then 
  25.       set the locH of sprite 30 = the locH of sprite 30 - 20
  26.       set the member of sprite 30 = "RocketL"
  27.     end if
  28.     if the mouseH > the locH of sprite 30 then 
  29.       set the locH of sprite 30 = the locH of sprite 30 + 20
  30.       set the member of sprite 30 = "RocketR"
  31.     end if
  32.     if the mouseV < the locV of sprite 30 then set the locV of sprite 30 = the locV of sprite 30 - 20
  33.     if the mouseV > the locV of sprite 30 and the locV of sprite 30 < 300 then set the locV of sprite 30 = the locV of sprite 30 + 20
  34.     if soundBusy(1) then set horrible = 1
  35.     else puppetSound "thruster"
  36.     abort
  37.   end if
  38.   
  39.   if the locV of sprite 30 < 270 then 
  40.     set the locV of sprite 30 = the locV of sprite 30 + 20
  41.     if the locV of sprite 30 > 269 then puppetSound "thump"
  42.     abort
  43.   end if
  44.   
  45.   if the locV of sprite 30 > 279 then puppetSound "off"
  46.   
  47.   if the mouseV < 270 or the mouseH > the locH of sprite 30 - 20 and the mouseH < the locH of sprite 30 + 20 then
  48.     if heading = 1 then set the member of sprite 30 = "Left"
  49.     if heading = 2 then set the member of sprite 30 = "Right"
  50.     set move = 0
  51.   end if
  52.   
  53.   if the mouseH > the locH of sprite 30 + 19 and the mouseV > 270 then 
  54.     set the member of sprite 30 = "Walk Right"
  55.     set heading = 2
  56.     set move = 1
  57.     set the locH of sprite 30 = the locH of sprite 30 + 15
  58.   end if
  59.   
  60.   if the mouseH < the locH of sprite 30 - 19 and the mouseV > 270 then 
  61.     set the member of sprite 30 = "Walk Left"
  62.     set heading = 1
  63.     set move = 1
  64.     set the locH of sprite 30 = the locH of sprite 30 - 15
  65.   end if
  66.   
  67.   if the mouseV > the locV of sprite 30 and the mouseV < the locV of sprite 30 + 50 then 
  68.     if move = 0 and heading = 1 then set the member of sprite 30 = "Left"
  69.     if move = 0 and heading = 2 then set the member of sprite 30 = "Right"
  70.     set updown = 0
  71.   end if
  72.   
  73.   if the mouseV < the locV of sprite 30 then 
  74.     if the locV of sprite 30 > 300 then
  75.       if move = 0 and heading = 1 then set the member of sprite 30 = "Walk Left"
  76.       if move = 0 and heading = 2 then set the member of sprite 30 = "Walk Right"
  77.       set the locV of sprite 30 = the locV of sprite 30 - 5
  78.       set updown = 1
  79.     end if
  80.   end if
  81.   
  82.   if the mouseV > the locV of sprite 30 + 50 then 
  83.     if the locV of sprite 30 < 350 then
  84.       if move = 0 and heading = 1 then set the member of sprite 30 = "Walk Left"
  85.       if move = 0 and heading = 2 then set the member of sprite 30 = "Walk Right"
  86.       set the locV of sprite 30 = the locV of sprite 30 + 5
  87.       set updown = 1
  88.     end if
  89.   end if
  90.   
  91.   if the locH of sprite 30 > 500 then 
  92.     if updown = 0 then set the member of sprite 30 = "Right"
  93.     set the locH of sprite 30 = 500
  94.   end if
  95.   
  96.   if the locH of sprite 30 < 100 then 
  97.     if updown = 0 then set the member of sprite 30 = "Left"
  98.     set the locH of sprite 30 = 100
  99.   end if
  100. end
  101.  
  102. on rightMouseDown
  103.   global silly
  104.   global heading
  105.   global CStop
  106.   if CStop = 1 then abort
  107.   set silly = 1
  108. end
  109.  
  110. on rightMouseUp
  111.   global silly
  112.   global heading
  113.   set silly = 0
  114.   set the member of sprite 30 = "Right"
  115. end
  116.  
  117. on exitFrame
  118.   go the frame
  119. end
  120.